<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sinox="http://www.sinosoft.com.cn/sinox"
	xmlns:p="http://primefaces.org/ui">
 
	<ui:param name="compBean" value="#{commonContentViewBean}" />
	<h:form> 
		<p:schedule value="#{compBean.eventModel}" locale="zh_cn" editable="true" widgetVar="myschedule">
	         <p:ajax event="dateSelect" listener="#{compBean.onDateSelect}" update="eventDetails" oncomplete="eventDialog.show()" />
	         <p:ajax event="eventSelect" listener="#{compBean.onEventSelect}" update="eventDetails" oncomplete="eventDialog.show()" />
	     </p:schedule>
	
       <p:dialog widgetVar="eventDialog" header="排班信息" showEffect="clip" hideEffect="clip">
          <h:panelGrid id="eventDetails" columns="2">
             <h:outputLabel for="title" value="标题：" />
             <p:inputText id="title" value="#{compBean.event.title}" required="true"/>

             <h:outputLabel for="from" value="开始时间：" />
             <p:inputMask id="from" value="#{compBean.event.startDate}" mask="99/99/9999">
                 <f:convertDateTime pattern="dd/MM/yyyy" />
             </p:inputMask>

             <h:outputLabel for="to" value="结束时间：" />
             <p:inputMask id="to" value="#{compBean.event.endDate}" mask="99/99/9999">
                 <f:convertDateTime pattern="dd/MM/yyyy" />
             </p:inputMask>

             <h:outputLabel for="allDay" value="是否全天：" />
             <h:selectBooleanCheckbox id="allDay" value="#{compBean.event.allDay}" />

             <p:commandButton type="reset" value="重置" />
             <p:commandButton value="提交" actionListener="#{compBean.addEvent}" oncomplete="myschedule.update();eventDialog.hide();"/>
          </h:panelGrid>
       </p:dialog>
	</h:form>	
</ui:composition>